package org.dromara.authcode.domain.bo;

import org.dromara.authcode.domain.DeviceAuth;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 设备激活记录业务对象 device_auth
 *
 * @author Miles Meng
 * @date 2025-08-08
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = DeviceAuth.class, reverseConvertGenerate = false)
public class DeviceAuthBo extends BaseEntity {

    /**
     * 激活记录ID
     */
    @NotNull(message = "激活记录ID不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 用户ID
     */
    private Long userId;

    /**
     * 设备ID
     */
    @NotBlank(message = "设备ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long deviceId;

    private String macAddress;
    private Long goodsId;
    /**
     * 授权码
     */
    @NotBlank(message = "授权码不能为空", groups = { AddGroup.class, EditGroup.class })
    private String authCode;

    /**
     * 使用的授权码ID
     */
    @NotNull(message = "使用的授权码ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long authCodeId;

    /**
     * 授权时间
     */
    @NotNull(message = "授权时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date authTime;

    /**
     * 到期时间
     */
    @NotNull(message = "到期时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date expireTime;


}
